<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Bars</title>


</head>
<body>
	<h1>Lista de bares</h1>


	<table>
		
		<tr>
			<td><strong>Name</strong></td>
			<td><strong>Description</strong></td>
			<td><strong>Quality</strong></td>
		</tr>
		<c:forEach items="${barList}" var="bar">
		<tr>
			
			<td>
			 ${bar.name}
			</td>
			
			<td>${bar.description}</td>
			
			<td>${bar.quality}</td>
			
			<td><a href="<c:url value="/bars/${bar.id}"/>">Editar</a></td>
			<td>
				<form action="<c:url value="/bars/${bar.id}"/>" method="POST" >
					<button class="link" name="_method" value="DELETE">X</button>
				</form>
			</td>
		</tr>
		</c:forEach>
	</table>
	
	<br/>
	<a href="<c:url value="/bars/new"/>"> +Bar </a>
	
</body>
</html>